package com.ruibang.glass.produce.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-11-20  18:33
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@ApiModel
@TableName("g_produce_rule_base")
public class RuleBase extends BaseEntity implements Serializable {

    @ApiModelProperty("规则id")
    @TableId(value = "rule_id", type = IdType.ASSIGN_ID)
    private String ruleId;

    @ApiModelProperty("规则名称")
    @NotBlank(message = "规则名称不可为空！")
    private String ruleName;

    @ApiModelProperty("规则条件")
    @NotBlank(message = "规则条件不可为空！")
    private String ruleCondition;

    @ApiModelProperty("阈值")
    @NotNull(message = "阈值不可为空！")
    private Float ruleValue;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("报警等级")
    @NotBlank(message = "报警等级不可为空！")
    private String level;

    @ApiModelProperty("设备id")
    private String deviceId;

}
